<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
   xmlns:h="http://java.sun.com/jsf/html"
   xmlns:ui="http://java.sun.com/jsf/facelets"
   xmlns:ace="http://www.icefaces.org/icefaces/components"
   xmlns:icecore="http://www.icefaces.org/icefaces/core">
   <h:body> 
      <ui:composition template="/WEB-INF/templates/simpleuser/template.xhtml">
         <ui:define name="content">
              <h:form id="form-devices">
              	<icecore:singleSubmit />
                  <ace:dataTable id="dev-list"
                                  value="#{devicesListBean.deviceDataBean}"
                                  var="dev">
                      <ace:column id="name-col" headerText="#{msgs['listdev.name']}">
                           <h:outputText id="name-row" value="#{dev.name}"/>
                      </ace:column>  
                      <ace:column id="type-col" headerText="#{msgs['listdev.type']}">
                           <h:outputText id="type-row" value="#{dev.type}"/>
                      </ace:column>  
                      <ace:column id="state-col" headerText="#{msgs['listdev.state']}">
                           <h:outputText id="state-row" value="#{msgs[dev.state]}"/>
                      </ace:column> 
                      <ace:column id="date-col" headerText="#{msgs['listdev.lastdate']}">
                           <h:outputText id="date-row" value="#{dev.lastdate}"/>
                      </ace:column>  
                      <ace:column id="conn-btn-col" headerText="#{msgs['listdev.conn']}">
                           <h:commandButton id="conn-btn-row" value="#{msgs[dev.btnname]}" 
	                                        disabled="#{dev.btndisabled}" actionListener="#{dev.pushbutton}"/>
                      </ace:column>    
                      <ace:column id="dev-lnk-col" headerText="#{msgs['listdev.conn']}">
                           <h:commandLink id="dev-lnk-row"        value="#{msgs['listdev.devlink']}" 
	                                      action="devicedata?faces-redirect=true"  actionListener="#{dev.dolink}"/>
                      </ace:column>
                  </ace:dataTable>                
              </h:form>
         </ui:define>					
      </ui:composition> 
   </h:body> 
</html>	